import os,sys,shutil
from cbxyh import cmd
cbxyh = True
a = sys.path[0]
while cbxyh:
    cbxyh = input(a+">")
    body = cbxyh.split(' ')
    if body[0] == "查询":
        cmd.refer(a)
    elif body[0] == "删除":
        cmd.delete(a,body[1])
    elif body[0] == "打开":
        a = cmd.openFile(a,body,body[1])
    elif body[0] == "新建":
        cmd.newFile(a,body[1])
    elif body[0] == "返回":
        a = cmd.getBack(a)
    elif body[0] == "帮助":
        cmd.cmdHelp(body)
    elif body[0] == "运行":
        cmd.fun(a,body[1])
    elif body[0] == "退出":
        cbxyh = False
    
    
